<:#720,9360><:f320,,> Well, I got really lazy and decided to just give you the math and no real explination or picures (maybe later if someone asks).
<:#360,9360><:f320,,>
<:#2880,9360><:f320,,>The following algorithims are called BAM which stands for Bi-directional Associative Memory. The reason why it bi-directional is because of its ability to relate pattern A to pattern B. For example: if you gave it pattern A it would give you patt
ern B and if you gave it pattern B it would give you pattern A. Another very interesting thing that this algorithim can do is profore error checking (fuzzy controle). This algorithim was probubly designed for an OCR package or a handwriting recogition pro
gram (Check out the program IREC.EXE).<:f><:f320,,>
<:#720,9360><:f320,,>Whatever its purpose it is self correcting and makes it ideal for modem transmitting.<:f><:f320,,><:f><:f320,,>
<:#720,9360><:f320,,> These algorithims are writtin to attempt to simulate the neurons in the brain and are there fore not simple litle 2+2 problems.
<:f320,,> M = number of Y neurons
<:f320,,><:f><:f320,,><:f320,,> N = number of X neurons<:f><:f320,,>
<:f320,,><:f><:f320,,><:f320,,><:f><:f320,,><:f><:f320,,><:f><:f320,,>in a 7x7 black and white image M = 7 and N = 7
<:#360,9360><:f320,,> /* Modified stuff from abouve goes here */
<:#360,9360><:f320,,> }<:f>
<:f320,,>
<:#1440,9360><:f320,,>The same is repeated for the second layer of neurons but switch all i's with j's and all j's with i's and all X's with Y's and all Y's with X's (because it took me about 30min to write the above). Do NOT change anything in the while statements.<:f>
<:f320,,><:f><:f320,,>
<:#360,9360><:f320,,>
<:#720,9360><:f320,,>The S's are the weights between each neuron. They are calculated by the folowing formulas:
<:#360,9360><:f320,,>
<:f320,,><:A1>
<:#360,9360><:f320,,>
<:f320,,><:A0>
<:#360,9360><:f320,,>
<:#720,9360><:f320,,><:f><:f320,,><:f><:f320,,>Well that about summs it up for creating a BAM matrix now for getting stuff out.
<:#360,9360><:f320,,>
<:#360,9360><:f320,,>I'll just give this to you in C since it is only about 10 lines long.
<:#360,9360><:f320,,>
<:#280,9360><:f320,,><:f>void dothink( void )
<:#280,9360>{
<:#280,9360>int i,j,c,sc,new; float sum;
<:#280,9360>
<:#280,9360>/* NUMBER OF CURRENT B<[>X] */
<:#280,9360>for(j=0; j<<49; j++)
<:#280,9360> {
<:#280,9360> sum=0;
<:#280,9360> /* COMPUTE SUM */
<:#280,9360> for(i = 0; i << 49; i++) sum += Xneurons<[>i] * W<[>i]<[>j];
<:#280,9360> /* FIND NEURON VALUE */
<:#280,9360> if(sum == thY<[>j]) new = Yneurons<[>j];
<:#280,9360> if(sum << thY<[>j]) new = -1;
<:#280,9360> if(sum <;> thY<[>j]) new = 1;
<:#280,9360> if(new != Yneurons<[>j]) setmod = 1;
<:#280,9360> /* RECORD MODIFICATION */
<:#280,9360> Yneurons<[>j] = new; /* STORE IT */
<:#280,9360> }
<:#280,9360> }
<:f320,,>A negitive 1 indecates off and a positive 1 indicates on. The output image is stored in Yneurons.<:f><:f320,,>
<:f320,,><:f><:f320,,>If you need more help leave me a message and I'll draw some pictures or whatever you need.